package cn.edu.scut.fsearch.util;

import java.util.ArrayList;
import java.util.List;

public class ArrayStringFilter {
	private String [] names;
	private String [] values;
	
	public void doFilter(String [] names,String [] values)
	{
		int length = names.length;
		List<String> tmpName = new ArrayList<String>();
		List<String> tmpValue = new ArrayList<String>();
		this.values = new String[length];
		for(int i=0;i<length;i++)
		{
			if(values[i] != null)
			{
				tmpName.add(names[i]);
				tmpValue.add(values[i]);
			}
		}
		this.names = tmpName.toArray(new String[0]);
		this.values = tmpValue.toArray(new String[0]);
	}

	public String[] getNames() {
		return names;
	}

	public String[] getValues() {
		return values;
	}
}
